<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8" />
		<title>录入客户信息 - 客户关系管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
		<meta content="" name="author" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />

		<!-- App favicon -->
		<link rel="shortcut icon" href="../assets/images/logo-1.png">

		<!-- App css -->
		<link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/jquery-ui.min.css" rel="stylesheet">
		<link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/app.min.css" rel="stylesheet" type="text/css" />

	</head>

	<body class="dark-topbar dark-sidenav">

		<!-- Top Bar Start -->
		<div th:replace="~{common/Top-bar::top-bar}"></div>
		<!-- Top Bar End -->


		<!-- Left Sidenav -->
		<div th:replace="~{common/Left-side-nav::left-side-nav}"></div>
		<!-- end left-sidenav-->

		<div class="page-wrapper">
			<!-- Page Content-->
			<div class="page-content">

				<div class="container-fluid">
					<!-- Page-Title -->
					<div class="row">
						<div class="col-sm-12">
							<div class="page-title-box">
								<h4 class="page-title">客户信息录入</h4>
							</div>
							<!--end page-title-box-->
						</div>
						<!--end col-->
					</div>
					<!-- end page title end breadcrumb -->

					<div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-body">
									<div class="row">
										<div class="col-lg-12">
											<form th:action="@{/customer/customer_add}" method="post"
													class="needs-validation" novalidate>
												<div class="form-group row">
													<label for="name"
														class="col-sm-2 col-form-label text-right">客户名称</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.name}" name="name"
															   required maxlength="50"
															id="name">
														<div class="invalid-feedback">客户名称不能为空，且不能超过50字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('name')}"
                                                             th:text="${errors.name}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="area"
														class="col-sm-2 col-form-label text-right">所在地区</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.area}" name="area"
																required maxlength="50"
															id="area">
														<div class="invalid-feedback">客户电话不能为空，且不能超过50字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('area')}"
                                                             th:text="${errors.area}"></div>
                                                    </div>
												</div>
												<div class="form-group row">
													<label for="custManager"
														class="col-sm-2 col-form-label text-right">客户经理</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.custManager}"  name="custManager"
																required maxlength="100"
															id="custManager">
														<div class="invalid-feedback">联系地址不能为空，且不超过100字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('custManager')}"
                                                             th:text="${errors.custManager}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="custLevel"
														class="col-sm-2 col-form-label text-right">客户等级</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.custLevel}" name="custLevel"
																required maxlength="50"
															id="custLevel">
														<div class="invalid-feedback">联系人不能为空，且不能超过50字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('custLevel')}"
                                                             th:text="${errors.custLevel}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="custSatisfaction"
														class="col-sm-2 col-form-label text-right">客户满意度</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.custSatisfaction}" name="custSatisfaction"
																required
															id="custSatisfaction">
														<div class="invalid-feedback">客户满意度不能为空，且在0到10之间</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('custSatisfaction')}"
                                                             th:text="${errors.custSatisfaction}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="custCredit"
														class="col-sm-2 col-form-label text-right">客户信用度</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.custCredit}" name="custCredit"
																required
															id="custCredit">
														<div class="invalid-feedback">客户信用度不能为空，且在0到10之间</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('custCredit')}"
                                                             th:text="${errors.custCredit}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="zipCode"
														class="col-sm-2 col-form-label text-right">邮政编码</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.zipCode}" name="zipCode"
																required maxlength="20"
															id="zipCode">
														<div class="invalid-feedback">客户信用度不能为空，且不能超过20字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('zipCode')}"
                                                             th:text="${errors.zipCode}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="address"
														class="col-sm-2 col-form-label text-right">客户地址</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.address}" name="address"
																required maxlength="200"
															id="address">
														<div class="invalid-feedback">客户信用度不能为空，且不能超过200字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('address')}"
                                                             th:text="${errors.address}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="phone"
														class="col-sm-2 col-form-label text-right">客户联系电话</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.phone}" name="phone"
																required maxlength="20"
															id="phone">
														<div class="invalid-feedback">客户信用度不能为空，且不能超过20字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('phone')}"
                                                             th:text="${errors.phone}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="fax"
														class="col-sm-2 col-form-label text-right">传真号码</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.fax}" name="fax"
																required maxlength="30"
															id="fax">
														<div class="invalid-feedback">传真号码不能为空，且不能超过30字</div>
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('fax')}"
                                                             th:text="${errors.fax}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="site"
														class="col-sm-2 col-form-label text-right">官方网站地址</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
                                                               th:value="${customer == null?'':customer.site}" name="site"
															id="site">
                                                        <div class="text-danger mb-2"
                                                             th:if="${errors != null and errors.containsKey('site')}"
                                                             th:text="${errors.site}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="tradingCertificate"
														   class="col-sm-2 col-form-label text-right">营业执照号码</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.tradingCertificate}" name="tradingCertificate"
															   required maxlength="50"
															   id="tradingCertificate">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('tradingCertificate')}"
															 th:text="${errors.tradingCertificate}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="legalRepresentative"
														   class="col-sm-2 col-form-label text-right">法人代表</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.legalRepresentative}" name="legalRepresentative"
															   required maxlength="50"
															   id="legalRepresentative">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('legalRepresentative')}"
															 th:text="${errors.legalRepresentative}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="registeredFund"
														   class="col-sm-2 col-form-label text-right">注册资金</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.registeredFund}" name="registeredFund"
															   required maxlength="50"
															   id="registeredFund">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('registeredFund')}"
															 th:text="${errors.registeredFund}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="annualTurnover"
														   class="col-sm-2 col-form-label text-right">年营业额</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.annualTurnover}" name="annualTurnover"
															   required maxlength="50"
															   id="annualTurnover">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('annualTurnover')}"
															 th:text="${errors.annualTurnover}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="custBank"
														   class="col-sm-2 col-form-label text-right">客户开户银行</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.custBank}" name="custBank"
															   required maxlength="50"
															   id="custBank">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('custBank')}"
															 th:text="${errors.custBank}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="custBankAccount"
														   class="col-sm-2 col-form-label text-right">客户开户银行账户</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.custBankAccount}" name="custBankAccount"
															   required maxlength="50"
															   id="custBankAccount">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('custBankAccount')}"
															 th:text="${errors.custBankAccount}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="landTaxNumber"
														   class="col-sm-2 col-form-label text-right">地税登记号</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.landTaxNumber}" name="landTaxNumber"
															   required maxlength="50"
															   id="landTaxNumber">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('landTaxNumber')}"
															 th:text="${errors.landTaxNumber}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="nationalTaxNumber"
														   class="col-sm-2 col-form-label text-right">国税登记号</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.nationalTaxNumber}" name="nationalTaxNumber"
															   required maxlength="50"
															   id="nationalTaxNumber">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('nationalTaxNumber')}"
															 th:text="${errors.nationalTaxNumber}"></div>
													</div>
												</div>
												<div class="form-group row">
													<label for="status"
														   class="col-sm-2 col-form-label text-right">客户状态</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${customer == null?'':customer.status}" name="status"
															   required maxlength="50"
															   id="status">
														<div class="invalid-feedback">营业执照号码不能为空，且不能超过50字</div>
														<div class="text-danger mb-2"
															 th:if="${errors != null and errors.containsKey('status')}"
															 th:text="${errors.status}"></div>
													</div>
												</div>
												<div class="row">
													<div class="col-sm-10 ml-auto">
														<button type="submit"
															class="btn btn-gradient-primary">保存</button>
														<button type="reset"
															class="btn btn-gradient-danger">重置</button>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div>
								<!--end card-body-->
							</div>
							<!--end card-->
						</div>
						<!--end col-->
					</div>
					<!--end row-->

				</div><!-- container -->
				<!--end footer-->
			</div>
			<!-- end page content -->
		</div>
		<!-- end page-wrapper -->




		<!-- jQuery  -->
		<script src="../assets/js/jquery.min.js"></script>
		<script src="../assets/js/bootstrap.bundle.min.js"></script>
		<script src="../assets/js/metismenu.min.js"></script>
		<script src="../assets/js/waves.js"></script>
		<script src="../assets/js/feather.min.js"></script>
		<script src="../assets/js/jquery.slimscroll.min.js"></script>
		<script src="../assets/js/jquery-ui.min.js"></script>

		<!-- App js -->
		<script src="../assets/js/app.js"></script>
		<script>

			// 对表单添加提交响应事件函数
			// 在提交响应事件处理函数中调用表单对象的验证方法如果验证通过则返回true,允许提交
			// 如果验证失败，则返回false，禁止提交
			$('.needs-validation').submit(function (event) {
				if (this.checkValidity() === false) {
					$(this).addClass('was-validated')
					return false;
				}else {
					return true;
				}
			})







		</script>
	</body>

</html>
